package com.demo.service.impl;

import com.demo.dao.LeaveDAO;
import com.demo.dao.impl.LeaveDAOImpl;
import com.demo.service.LeaveService;
import com.demo.bean.Leave;

import java.io.Serializable;
import java.util.Map;

/**
 * Leave模块的Service层（业务层）的具体实现类，对LeaveService接口中定义的抽象方法作出具体的功能实现
 */
public class LeaveServiceImpl implements LeaveService {
    //@Override
    public void add(Leave vo) {
        LeaveDAO leaveDAO = new LeaveDAOImpl();
        leaveDAO.add(vo);
    }

    //@Override
    public void delete(long id) {
        LeaveDAO leaveDAO = new LeaveDAOImpl();
        leaveDAO.delete(id);
    }

    //@Override
    public void update(Leave vo) {
        LeaveDAO leaveDAO = new LeaveDAOImpl();
        leaveDAO.update(vo);
    }

    //@Override
    public Leave get(Serializable id) {
        LeaveDAO leaveDAO = new LeaveDAOImpl();
        return leaveDAO.get(id);
    }

    //@Override
    public Map<String, Object> list(Map<String, Object> params) {
        LeaveDAO leaveDAO = new LeaveDAOImpl();
        return leaveDAO.list(params);
    }
}
